//
//  MYGAcademicShareView.swift
//  MYDoctor
//
//  Created by Denny on 2024/5/27.
//

import UIKit

class MYGAcademicShareView: UIView {
    
    var meeting_id:String = ""
    @IBAction func toClose(_ sender: Any) {
        if let c = tapCloseCompletion {
            c()
        }
    }
    var tapCloseCompletion:(()->Void)?
    
    @IBAction func toMoment(_ sender: Any) {
    }
    @IBAction func toWechat(_ sender: UIButton) {
        
        let textToShare:String = "医路通"
        let imageToShare:UIImage = UIImage(named: "AppIcon")!
    
        let token = MYGUserManager.getUser()?.verification_token ?? ""

        let urlToShare:URL = URL(string: "\(shareUrl)/#/pages/meeting/meetingDetails?meeting_id=\(meeting_id)&token=\(token)")!

        let activityItems:Array = [textToShare, imageToShare, urlToShare] as [Any]
        let activityVC:UIActivityViewController = UIActivityViewController.init(activityItems: activityItems, applicationActivities: nil)
        activityVC.excludedActivityTypes = [UIActivity.ActivityType.postToFacebook,UIActivity.ActivityType.airDrop]

        self.rootResponsder().navigationController?.present(activityVC, animated: true)
        
        
    }
    
    @IBAction func toQQ(_ sender: Any) {
    }
}
